/*
 * @Author: your name
 * @Date: 2021-08-27 16:25:35
 * @LastEditTime: 2021-08-30 16:21:28
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \briup\5-javascript\day05\6-去重.js
 */




//数组去重
var arr = [1, 2, 1, 3, 4, 5, 5];
console.log(arr.indexOf(6, 0))
var s = [];
for (var i = 0; i < arr.length; i++) {
    if (s.indexOf(arr[i]) == -1) {
        s.push(arr[i]);
    }
}
console.log(s);